package com.bwie.utils;


import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author : LeiMingkun
 * @date : 2024-08-09 14:04
 * @description : MyRabbitUtils
 **/
@Configuration
public class MyRabbitUtils {
    @Bean
    public Queue myQueue(){
        return new Queue("provinceQueue");
    }
    @Bean
    public Exchange myExchange(){
        return new DirectExchange("provinceExchange");
    }
    @Bean
    public Binding myBinding(){
        return BindingBuilder.bind(myQueue()).to(myExchange()).with("bwie").noargs();
    }
}